Optimal. Leaf size=94 \[ \frac {i d \text {Li}_2\left (-e^{i (a+b x)}\right )}{b^2}-\frac {i d \text {Li}_2\left (e^{i (a+b x)}\right )}{b^2}-\frac {d \sin (a+b x)}{b^2}+\frac {(c+d x) \cos (a+b x)}{b}-\frac {2 (c+d x) \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4408, 3296, 2637, 4183, 2279, 2391} \[ \frac {i d \text {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {i d \text {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {d \sin (a+b x)}{b^2}+\frac {(c+d x) \cos (a+b x)}{b}-\frac {2 (c+d x) \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2279
Rule 2391
Rule 2637
Rule 3296
Rule 4183
Rule 4408
Rubi steps
\begin {align*} \int (c+d x) \cos (a+b x) \cot (a+b x) \, dx &=\int (c+d x) \csc (a+b x) \, dx-\int (c+d x) \sin (a+b x) \, dx\\ &=-\frac {2 (c+d x) \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac {(c+d x) \cos (a+b x)}{b}-\frac {d \int \cos (a+b x) \, dx}{b}-\frac {d \int \log \left (1-e^{i (a+b x)}\right ) \, dx}{b}+\frac {d \int \log \left (1+e^{i (a+b x)}\right ) \, dx}{b}\\ &=-\frac {2 (c+d x) \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac {(c+d x) \cos (a+b x)}{b}-\frac {d \sin (a+b x)}{b^2}+\frac {(i d) \operatorname {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^2}-\frac {(i d) \operatorname {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^2}\\ &=-\frac {2 (c+d x) \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac {(c+d x) \cos (a+b x)}{b}+\frac {i d \text {Li}_2\left (-e^{i (a+b x)}\right )}{b^2}-\frac {i d \text {Li}_2\left (e^{i (a+b x)}\right )}{b^2}-\frac {d \sin (a+b x)}{b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.17, size = 176, normalized size = 1.87 \[ \frac {d \left (i \left (\text {Li}_2\left (-e^{i (a+b x)}\right )-\text {Li}_2\left (e^{i (a+b x)}\right )\right )+(a+b x) \left (\log \left (1-e^{i (a+b x)}\right )-\log \left (1+e^{i (a+b x)}\right )\right )-a \log \left (\tan \left (\frac {1}{2} (a+b x)\right )\right )\right )}{b^2}+\frac {d \cos (b x) (b x \cos (a)-\sin (a))}{b^2}-\frac {d \sin (b x) (b x \sin (a)+\cos (a))}{b^2}+\frac {c \cos (a+b x)}{b}+\frac {c \log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )}{b}-\frac {c \log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.65, size = 277, normalized size = 2.95 \[ \frac {2 \, {\left (b d x + b c\right )} \cos \left (b x + a\right ) - i \, d {\rm Li}_2\left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) - i \, d {\rm Li}_2\left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) - {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) - {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) + {\left (b c - a d\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) + {\left (b c - a d\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) - \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) + {\left (b d x + a d\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) + {\left (b d x + a d\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) - 2 \, d \sin \left (b x + a\right )}{2 \, b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )} \cos \left (b x + a\right ) \cot \left (b x + a\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.08, size = 199, normalized size = 2.12 \[ \frac {d \cos \left (b x +a \right ) x}{b}-\frac {d \sin \left (b x +a \right )}{b^{2}}+\frac {c \cos \left (b x +a \right )}{b}+\frac {d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}-\frac {d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x}{b}+\frac {i d \dilog \left ({\mathrm e}^{i \left (b x +a \right )}+1\right )}{b^{2}}-\frac {i d \dilog \left (1-{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}-\frac {d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) a}{b^{2}}-\frac {d a \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )}{b^{2}}+\frac {c \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.45, size = 199, normalized size = 2.12 \[ -\frac {2 i \, b d x \arctan \left (\sin \left (b x + a\right ), -\cos \left (b x + a\right ) + 1\right ) - 2 i \, b c \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) - 1\right ) + {\left (2 i \, b d x + 2 i \, b c\right )} \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) + 1\right ) - 2 \, {\left (b d x + b c\right )} \cos \left (b x + a\right ) - 2 i \, d {\rm Li}_2\left (-e^{\left (i \, b x + i \, a\right )}\right ) + 2 i \, d {\rm Li}_2\left (e^{\left (i \, b x + i \, a\right )}\right ) + {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) - {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right ) + 2 \, d \sin \left (b x + a\right )}{2 \, b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \cos \left (a+b\,x\right )\,\mathrm {cot}\left (a+b\,x\right )\,\left (c+d\,x\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (c + d x\right ) \cos {\left (a + b x \right )} \cot {\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________